<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<!-- 上传插件 -->
<link rel="stylesheet"
	href="/ajax/plugins/bootstrap-fileinput/css/fileinput.css"
	th:href="@{/ajax/plugins/bootstrap-fileinput/css/fileinput.css}" />
<link href="/css/font-awesome.css" th:href="@{/css/font-awesome.css}"
	rel="stylesheet" />
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<div class="row">
			<div class="clients-list">
				<ul class="nav nav-tabs">
					<li class="active"><a data-toggle="tab" href="#tab-1"><i
							class="fa fa-gear"></i>网站设置</a></li>
					<li class=""><a data-toggle="tab" href="#tab-2"><i
							class="fa fa-envelope-o"></i>邮件服务</a></li>
				</ul>
				<div class="tab-content">
					<div id="tab-1" class="tab-pane active">
						<div class="full-height-scroll">
							<div class="table-responsive">
								<form class="form-horizontal m" id="form-website-websitesave">
									<input id="websiteId" name="websiteId"
										th:value="${website.websiteId}" type="hidden">
									<div class="form-group">
										<label class="col-sm-3 control-label"><em
											class="gg-star" style="color: red; font-style: normal;">*&nbsp;</em>网站名称：</label>
										<div class="col-sm-8">
											<input id="websiteTitleName" name="websiteTitleName"
												class="form-control" type="text"
												th:value="${website.websiteTitleName}">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label">网站图标：</label>
										<div class="col-sm-4">
											<input id="file-1" class="file" type="file" name="file">
										</div>
										<div class="col-sm-4" id="show1" align="center"
											style="display: none">
											<img id="showImg1" width="285" height="285" src=""></img>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label">网站描述：</label>
										<div class="col-sm-8">
											<input id="websiteDes" name="websiteDes" class="form-control"
												type="text" th:value="${website.websiteDes}">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label"><i
											class="fa fa-question-circle" title="用于下载管理链接拼接，文章推送百度已验证站点"></i>&nbsp;网站域名：</label>
										<div class="col-sm-8">
											<input id="websiteDomainName" name="websiteDomainName"
												class="form-control" type="text"
												th:value="${website.websiteDomainName}">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label"><em
											class="gg-star" style="color: red; font-style: normal;">*&nbsp;</em>网站公网IP：</label>
										<div class="col-sm-8">
											<input id="websitePublicIp" name="websitePublicIp"
												class="form-control" type="text"
												th:value="${website.websitePublicIp}">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label"><em
											class="gg-star" style="color: red; font-style: normal;">*&nbsp;</em>网站开放端口：</label>
										<div class="col-sm-8">
											<input id="websitePublicPort" name="websitePublicPort"
												class="form-control" type="text"
												th:value="${website.websitePublicPort}">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label"><i
											class="fa fa-question-circle" title="用于文章推送百度已验证站点Token"></i>&nbsp;百度链接提交token：</label>
										<div class="col-sm-8">
											<input id="websiteBaiduToken" name="websiteBaiduToken"
												class="form-control" type="text"
												th:value="${website.websiteBaiduToken}">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label"><em
											class="gg-star" style="color: red; font-style: normal;">*&nbsp;</em>网站版权信息：</label>
										<div class="col-sm-8">
											<input id="websiteCopyrightInformation"
												name="websiteCopyrightInformation" class="form-control"
												type="text"
												th:value="${website.websiteCopyrightInformation}">
										</div>
									</div>

									<div class="form-group">
										<label class="col-sm-3 control-label">备注：</label>
										<div class="col-sm-8">
											<input id="remark" name="remark" class="form-control"
												type="text" th:value="${website.remark}">
										</div>
									</div>
									<div class="form-group">
										<div class="form-control-static col-sm-offset-9">
											<button type="submit" class="btn btn-primary">提交</button>
										</div>
									</div>
								</form>
							</div>
						</div>
					</div>
					<div id="tab-2" class="tab-pane">
						<div class="full-height-scroll">
							<div class="table-responsive">
								<form class="form-horizontal m" id="form-website-mailsave">
									<input id="websiteId2" name="websiteId"
										th:value="${website.websiteId}" type="hidden">
									<div class="form-group">
										<label class="col-sm-3 control-label"><em
											class="gg-star" style="color: red; font-style: normal;">*&nbsp;</em>SMTP服务器：</label>
										<div class="col-sm-8">
											<input id="websiteMailSmtpUrl" name="websiteMailSmtpUrl"
												class="form-control" type="text"
												th:value="${website.websiteMailSmtpUrl}">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label"><em
											class="gg-star" style="color: red; font-style: normal;">*&nbsp;</em>SMTP端口：</label>
										<div class="col-sm-8">
											<input id="websiteMailSmtpPort" name="websiteMailSmtpPort"
												class="form-control" type="text"
												th:value="${website.websiteMailSmtpPort}">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label"><em
											class="gg-star" style="color: red; font-style: normal;">*&nbsp;</em>发件人邮箱：</label>
										<div class="col-sm-8">
											<input id="websiteMailSenderMailbox"
												name="websiteMailSenderMailbox" class="form-control"
												type="text" th:value="${website.websiteMailSenderMailbox}">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label"><em
											class="gg-star" style="color: red; font-style: normal;">*&nbsp;</em>发件人昵称：</label>
										<div class="col-sm-8">
											<input id="websiteMailSenderNickname"
												name="websiteMailSenderNickname" class="form-control"
												type="text" th:value="${website.websiteMailSenderNickname}">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label"><em
											class="gg-star" style="color: red; font-style: normal;">*&nbsp;</em>发件人邮箱密码：</label>
										<div class="col-sm-8">
											<input id="websiteMailSenderPassword"
												name="websiteMailSenderPassword" class="form-control"
												type="password"
												th:value="${website.websiteMailSenderPassword}">
										</div>
									</div>
									<div class="form-group">
										<div class="form-control-static col-sm-offset-9">
											<button type="submit" class="btn btn-primary">提交</button>
										</div>
									</div>
								</form>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div th:include="include::footer"></div>
		<script src="/ajax/plugins/bootstrap-fileinput/js/fileinput.min.js"
			th:src="@{/ajax/plugins/bootstrap-fileinput/js/fileinput.min.js}"></script>
		<script src="/ajax/plugins/bootstrap-fileinput/js/locales/zh.js"
			th:src="@{/ajax/plugins/bootstrap-fileinput/js/locales/zh.js  }"></script>
		<script src="/ajax/plugins/bootstrap-fileinput/js/locales/fr.js"
			th:src="@{/ajax/plugins/bootstrap-fileinput/js/locales/fr.js  }"></script>
		<script th:inline="javascript">
		var fileBase64_1=[[${website.websiteIco}]];
		//显示
		if(fileBase64_1!=null&&fileBase64_1!=''){
			$("#show1").css('display', 'block');
			document.getElementById("showImg1").src = fileBase64_1;
		}
		
		//上传绑定
		// 上传文件
		$("#file-1").fileinput({
			language : 'zh', // 设置语言
			uploadUrl : ctx + "common/file/uploadImgFile",
			allowedFileExtensions : [ 'jpg', 'png', 'jpeg',
										'gif','ico' ],// 接收的文件后缀
			showUpload : true, // 是否显示上传按钮
			showRemove : false, // 是否显示移除按钮
			showCaption : false,// 是否显示标题
			browseClass : "btn btn-primary", // 按钮样式
			dropZoneEnabled : true,//是否显示拖拽区域
			uploadAsync : true,
			showBrowse : true,
			browseOnZoneClick : false,
			maxFileCount : 1, // 表示允许同时上传的最大文件个数
			enctype : 'multipart/form-data',
			maxFileSize : 512
		// 单位为kb，如果为0表示不限制文件大小
		}).on("filebatchselected", function(event, files) {
			//返回文件名
		}).on('filesuccessremove', function(event, id){
			$("#show1").css('display', 'none');
			fileBase64_1=null;
		}).on("fileuploaded", function(event, data) {
			//返回文件名,改过，实际返回base64编码
			fileBase64_1 = (data.response.code == 0) ? (data.response.imgbase64String) : null;
			$("#show1").css('display', 'block');
			document.getElementById("showImg1").src = fileBase64_1;
			/* //返回文件修改名
			fileUuidName = (data.response.code == 0) ? (data.response.fileName) : null; */
		});
	</script>

		<script src="/rzblog/system/website/website.js"
			th:src="@{/rzblog/system/website/website.js}">
			
		</script>
</body>
</html>
